import Vue from 'vue'
import axios from 'axios'
import { Promise } from 'core-js'

axios.interceptors.response.use(response=>{
    if(response.status = 200){
        return Promise.resolve(response)
    }else{
        return Promise.reject(response)
    }
},error=>{
    if(error.response.status == 403){
        alert('登陆过期')
        window.location.href = 'https://www.xuetianxia.cn/'
    }else{
        alert('其他问题')
    }
})

Vue.prototype.axios = axios

